package com.jason.bbs.comment.feign.hystrix;

import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Component;

import com.jason.bbs.bean.ResultJson;
import com.jason.bbs.comment.feign.UserService;

@Component
public class UserHystrix implements UserService {
	@Value("${debug:false}")
	private boolean debug;

	@Override
	public ResultJson exitis(Integer userId) {
		ResultJson code = new ResultJson(200, "成功");
		code.put("exitis", debug ? 100 != userId : "error");
		return code;
	}

}
